/* Salil Benegal and Jon Green
Replication data for "Cost sensitivity, partisan cues, and support for the Green New Deal" */

use "C:\Users\benegals\Dropbox\GND cost study\replication files\replicationdata.dta" 

set more off 
set scheme plottig

tab pid3

/* Set up 7 point partyid var - 1 Strong R, 2 R, 3 Lean R, 4 Ind, 5 Lean D, 6 D, 7 Strong D */

gen partyid7=.
replace partyid7=1 if repstrength==1 & pid3==1
replace partyid7=2 if repstrength==2 & pid3==1
replace partyid7=3 if pidlean==1 
replace partyid7=4 if pidlean==3
replace partyid7=5 if pidlean==2
replace partyid7=6 if demstrength==2 & pid3==2
replace partyid7=7 if demstrength==1 & pid3==2

label define partyid7 1 "Strong R" 2 "Moderate R" 3 "Lean R" 4 "Independent" 5 "Lean D" 6 "Moderate D" 7 "Strong D"
label values partyid7 partyid7

/* 3 point partyid scale, but with leaners included with partisans */

gen partyid3=.
replace partyid3=1 if partyid7==1
replace partyid3=1 if partyid7==2
replace partyid3=1 if partyid7==3
replace partyid3=2 if partyid7==4
replace partyid3=3 if partyid7==5
replace partyid3=3 if partyid7==6
replace partyid3=3 if partyid7==7

label define partyid3 1 "Republican w/ leaners" 2 "Independent w/o leaners" 3 "Democratic w/ leaners"
label values partyid3 partyid3

tab green_ns, m
tab green_low, m
tab green_med, m
tab green_hi, m

/* recoding 'not sure' in all policy Qs  to .n */

recode green*(6=.n)
recode re_*(6=.n)
recode adapt_*(6=.n)
recode ctax_*(6=.n)
recode reforest_*(6=.n)
recode nuc_*(46=.n)

gen greenjobs_comb=.
replace greenjobs=1 if 	green_n==1
replace greenjobs=1 if 	green_l==1
replace greenjobs=1 if 	green_m==1
replace greenjobs=1 if 	green_h==1
replace greenjobs=1 if 	green_n==2
replace greenjobs=1 if 	green_l==2
replace greenjobs=1 if 	green_m==2
replace greenjobs=1 if 	green_h==2
replace greenjobs=2 if 	green_n==3
replace greenjobs=2 if 	green_l==3
replace greenjobs=2 if 	green_m==3
replace greenjobs=2 if 	green_h==3
replace greenjobs=3 if 	green_n==4
replace greenjobs=3 if 	green_l==4
replace greenjobs=3 if 	green_m==4
replace greenjobs=3 if 	green_h==4
replace greenjobs=3 if 	green_n==5
replace greenjobs=3 if 	green_l==5
replace greenjobs=3 if 	green_m==5
replace greenjobs=3 if 	green_h==5

label define policy 1 "Support or strongly support" 2 "Neither" 3 "Oppose or strongly oppose"

label values greenjobs policy

gen greenjobstreatment=.
replace greenjobstreatment=1 if !missing(green_ns)
replace greenjobstreatment=2 if !missing(green_low)
replace greenjobstreatment=3 if !missing(green_med)
replace greenjobstreatment=4 if !missing(green_hi)

label define treatment 1 "No cost shown" 2 "Low cost" 3 "Medium cost" 4 "High cost"
label values greenjobstreatment treatment

gen renewables_comb=.
replace renewables=1 if 	re_n==1
replace renewables=1 if 	re_l==1
replace renewables=1 if 	re_m==1
replace renewables=1 if 	re_h==1
replace renewables=1 if 	re_n==2
replace renewables=1 if 	re_l==2
replace renewables=1 if 	re_m==2
replace renewables=1 if 	re_h==2
replace renewables=2 if 	re_n==3
replace renewables=2 if 	re_l==3
replace renewables=2 if 	re_m==3
replace renewables=2 if 	re_h==3
replace renewables=3 if 	re_n==4
replace renewables=3 if 	re_l==4
replace renewables=3 if 	re_m==4
replace renewables=3 if 	re_h==4
replace renewables=3 if 	re_n==5
replace renewables=3 if 	re_l==5
replace renewables=3 if 	re_m==5
replace renewables=3 if 	re_h==5

label values renewables policy

gen renewablestreatment=.
replace renewablestreatment=1 if !missing(re_ns)
replace renewablestreatment=2 if !missing(re_low)
replace renewablestreatment=3 if !missing(re_med)
replace renewablestreatment=4 if !missing(re_hi)

label values renewablestreatment treatment


gen adaptation_comb=.
replace adaptation=1 if 	adapt_n==1
replace adaptation=1 if 	adapt_l==1
replace adaptation=1 if 	adapt_m==1
replace adaptation=1 if 	adapt_h==1
replace adaptation=1 if 	adapt_n==2
replace adaptation=1 if 	adapt_l==2
replace adaptation=1 if 	adapt_m==2
replace adaptation=1 if 	adapt_h==2
replace adaptation=2 if 	adapt_n==3
replace adaptation=2 if 	adapt_l==3
replace adaptation=2 if 	adapt_m==3
replace adaptation=2 if 	adapt_h==3
replace adaptation=3 if 	adapt_n==4
replace adaptation=3 if 	adapt_l==4
replace adaptation=3 if 	adapt_m==4
replace adaptation=3 if 	adapt_h==4
replace adaptation=3 if 	adapt_n==5
replace adaptation=3 if 	adapt_l==5
replace adaptation=3 if 	adapt_m==5
replace adaptation=3 if 	adapt_h==5
label values adaptation policy

gen adaptationtreatment=.
replace adaptationtreatment=1 if !missing(adapt_ns)
replace adaptationtreatment=2 if !missing(adapt_low)
replace adaptationtreatment=3 if !missing(adapt_med)
replace adaptationtreatment=4 if !missing(adapt_hi)

label values adaptationtreatment treatment

gen carbontax_comb=.
replace carbontax=1 if 	ctax_n==1
replace carbontax=1 if 	ctax_l==1
replace carbontax=1 if 	ctax_m==1
replace carbontax=1 if 	ctax_h==1
replace carbontax=1 if 	ctax_n==2
replace carbontax=1 if 	ctax_l==2
replace carbontax=1 if 	ctax_m==2
replace carbontax=1 if 	ctax_h==2
replace carbontax=2 if 	ctax_n==3
replace carbontax=2 if 	ctax_l==3
replace carbontax=2 if 	ctax_m==3
replace carbontax=2 if 	ctax_h==3
replace carbontax=3 if 	ctax_n==4
replace carbontax=3 if 	ctax_l==4
replace carbontax=3 if 	ctax_m==4
replace carbontax=3 if 	ctax_h==4
replace carbontax=3 if 	ctax_n==5
replace carbontax=3 if 	ctax_l==5
replace carbontax=3 if 	ctax_m==5
replace carbontax=3 if 	ctax_h==5
label values carbontax policy

gen carbontaxtreatment=.
replace carbontaxtreatment=1 if !missing(ctax_ns)
replace carbontaxtreatment=2 if !missing(ctax_low)
replace carbontaxtreatment=3 if !missing(ctax_med)
replace carbontaxtreatment=4 if !missing(ctax_hi)

label values carbontaxtreatment treatment

gen reforestation_comb=.
replace reforestation=1 if 	reforest_n==1
replace reforestation=1 if 	reforest_l==1
replace reforestation=1 if 	reforest_m==1
replace reforestation=1 if 	reforest_h==1
replace reforestation=1 if 	reforest_n==2
replace reforestation=1 if 	reforest_l==2
replace reforestation=1 if 	reforest_m==2
replace reforestation=1 if 	reforest_h==2
replace reforestation=2 if 	reforest_n==3
replace reforestation=2 if 	reforest_l==3
replace reforestation=2 if 	reforest_m==3
replace reforestation=2 if 	reforest_h==3
replace reforestation=3 if 	reforest_n==4
replace reforestation=3 if 	reforest_l==4
replace reforestation=3 if 	reforest_m==4
replace reforestation=3 if 	reforest_h==4
replace reforestation=3 if 	reforest_n==5
replace reforestation=3 if 	reforest_l==5
replace reforestation=3 if 	reforest_m==5
replace reforestation=3 if 	reforest_h==5
label values reforestation policy

gen reforestationtreatment=.
replace reforestationtreatment=1 if !missing(reforest_ns)
replace reforestationtreatment=2 if !missing(reforest_low)
replace reforestationtreatment=3 if !missing(reforest_med)
replace reforestationtreatment=4 if !missing(reforest_hi)

label values reforestationtreatment treatment


gen nuclear_comb=.
replace nuclear=1 if 	nuc_n==41
replace nuclear=1 if 	nuc_l==41
replace nuclear=1 if 	nuc_m==41
replace nuclear=1 if 	nuc_h==41
replace nuclear=1 if 	nuc_n==42
replace nuclear=1 if 	nuc_l==42
replace nuclear=1 if 	nuc_m==42
replace nuclear=1 if 	nuc_h==42
replace nuclear=2 if 	nuc_n==43
replace nuclear=2 if 	nuc_l==43
replace nuclear=2 if 	nuc_m==43
replace nuclear=2 if 	nuc_h==43
replace nuclear=3 if 	nuc_n==44
replace nuclear=3 if 	nuc_l==44
replace nuclear=3 if 	nuc_m==44
replace nuclear=3 if 	nuc_h==44
replace nuclear=3 if 	nuc_n==45
replace nuclear=3 if 	nuc_l==45
replace nuclear=3 if 	nuc_m==45
replace nuclear=3 if 	nuc_h==45
label values nuclear policy

gen nucleartreatment=.
replace nucleartreatment=1 if !missing(nuc_ns)
replace nucleartreatment=2 if !missing(nuc_low)
replace nucleartreatment=3 if !missing(nuc_med)
replace nucleartreatment=4 if !missing(nuc_hi)

label values nucleartreatment treatment

label var partyid7 "7 point PID scale"
label var partyid3 "3 point PID scale with leaners included with party"
label var greenjobs_comb "Combined green jobs support across payfors"
label var renewables_comb "Combined renewables support across payfors"
label var adaptation_comb "Combined adaptation support across payfors"
label var carbontax_comb "Combined carbon tax/dividend support across payfors"
label var reforestation_comb "Combined reforestation support across payfors"
label var nuclear_ "Combined nuclear support across payfors"

tab partyid3, gen(partisan)
rename partisan1 Republican
rename partisan2 Independent
rename partisan3 Democrat

tab ideo, gen(ideology)
rename ideology1 vconservative
rename ideology2 conservative
rename ideology3 moderate
rename ideology4 liberal
rename ideology5 vliberal

gen scicon1=.
replace scicon1=1 if cchumans<3
replace scicon1=0 if cchumans >= 3

destring educ, replace
tab educ
replace educ=.m if missing(educ)
replace educ=.n if educ<1
label define educ 1 "Some high school or less"  2 "High school graduate" 3 "Other post high school vocational training" /// 
4 "Some college, but no degree" 5 "Associate's degree" 6 "Bachelor's degree" 7 "Master's or professional degree" 8 "Doctorate degree"
label values educ educ

gen educ2=.
replace educ2=1 if education<3
replace educ2=2 if education>2 & education<5
replace educ2=3 if education>4 & education<7
replace educ2=4 if education>6 & education<9
label define educ2 1 "HS or less"  2 "Post-HS but no degree" 3 "Associate's or bachelor's degree" 4 "Graduate or professional degree"
label values educ2 educ2
tab educ2, gen(educlevel)


destring gender, replace
recode gender(2=0)
label define gender 0 "Female" 1 "Male"
label values gender gender

destring eth, replace
gen race=.
replace race=1 if eth==1
replace race=2 if eth==2
replace race=3 if eth==3
replace race=4 if eth>3 & eth<15
replace race=5 if eth==15
label define race 1 "White" 2 "Black or African-American" 3 "Native American or Alaska Native" 4 "Asian or Pacific Islander" 5 "Other"
label values race race
tab race, gen(raceth)


tab greenjobs_comb, gen(gj_support)
tab renewables_comb, gen(re_support)
tab adaptation_comb, gen(adapt_support)
tab carbontax_comb, gen(ctax_support)
tab reforestation_comb, gen(refor_support)
tab nuclear_comb, gen(nuc_support)


// Figure 1

reg gj_support1 b1.greenjobstreatment
coefplot, xline(0, lp(dash) lcolor(red)) drop(_cons) levels(99.75 95) legend(order(1 "99.75% CI" 2 "95% CI") rows(1) position(6)) ciopts(recast(. rcap)) xlabel(-.2 -.1 0 .1 .2) title("Green jobs") xtitle("Treatment effects") saving(1a, replace)

reg re_support1 b1.renewablestreatment
coefplot, xline(0, lp(dash) lcolor(red)) drop(_cons) levels(99.75 95) legend(order(1 "99.75% CI" 2 "95% CI") rows(1) position(6)) ciopts(recast(. rcap)) xlabel(-.2 -.1 0 .1 .2) title("Renewable energy mandate") xtitle("Treatment effects") saving(1b, replace)

reg adapt_support1 b1.adaptationtreatment 
coefplot, xline(0, lp(dash) lcolor(red)) drop(_cons) levels(99.75 95) legend(order(1 "99.75% CI" 2 "95% CI") rows(1) position(6)) ciopts(recast(. rcap)) xlabel(-.2 -.1 0 .1 .2) title("National adaptation fund") xtitle("Treatment effects") saving(1c, replace)

reg refor_support1 b1.reforestationtreatment 
coefplot, xline(0, lp(dash) lcolor(red)) drop(_cons) levels(99.75 95) legend(order(1 "99.75% CI" 2 "95% CI") rows(1) position(6)) ciopts(recast(. rcap)) xlabel(-.2 -.1 0 .1 .2) title("Reforestation policy") xtitle("Treatment effects") saving(1d, replace)

reg ctax_support1 b1.carbontaxtreatment
coefplot, xline(0, lp(dash) lcolor(red)) drop(_cons) levels(99.75 95) legend(order(1 "99.75% CI" 2 "95% CI") rows(1) position(6)) ciopts(recast(. rcap)) xlabel(-.2 -.1 0 .1 .2) title("Carbon tax and dividend") xtitle("Treatment effects") saving(1e, replace)

reg nuc_support1 b1.nucleartreatment 
coefplot, xline(0, lp(dash) lcolor(red)) drop(_cons) levels(99.75 95) legend(order(1 "99.75% CI" 2 "95% CI") rows(1) position(6)) ciopts(recast(. rcap)) xlabel(-.2 -.1 0 .1 .2) title("Energy investment policy") xtitle("Treatment effects") saving(1f, replace)
	
graph combine 1a.gph 1b.gph 1c.gph 1d.gph 1e.gph 1f.gph, col(2)

// Figure 2: Support for each cost treatment by PID
eststo clear
reg gj_support1 b1.greenjobstreatment if Dem==1
estimates store gj_dem
reg gj_support1 b1.greenjobstreatment if Rep==1
estimates store gj_rep

coefplot (gj_dem, msymbol(X) label (Democrats)) (gj_rep, label(Republicans) ), xline(0, lp(dash) lcolor(red)) drop(_cons) ///
levels(99.75 95) legend(order(1 "99.75% CI" 2 "95% CI" 3 "Dem" 4 "Rep") rows(1) position(6)) ciopts(recast(. rcap)) xlabel(-.2 -.1 0 .1 .2) title("Green jobs") xtitle("Treatment effects") saving(1a, replace)

reg re_support1 b1.renewablestreatment if Dem==1 
estimates store re_dem
reg re_support1 b1.renewablestreatment if Rep==1
estimates store re_rep

coefplot (re_dem, msymbol(X) label (Democrats)) (re_rep, label (Republicans) ), xline(0, lp(dash) lcolor(red)) drop(_cons) ///
levels(99.75 95) legend(order(1 "99.75% CI" 2 "95% CI" 3 "Dem" 4 "Rep") rows(1) position(6)) ciopts(recast(. rcap)) xlabel(-.2 -.1 0 .1 .2) title("Renewable mandates") xtitle("Treatment effects") saving(1b, replace)

reg adapt_support1 b1.adaptationtreatment if Dem==1 
estimates store ad_dem
reg adapt_support1 b1.adaptationtreatment if Rep==1 
estimates store ad_rep

coefplot (ad_dem, msymbol(X) label (Democrats)) (ad_rep, label (Republicans) ), xline(0, lp(dash) lcolor(red)) drop(_cons) ///
levels(99.75 95) legend(order(1 "99.75% CI" 2 "95% CI" 3 "Dem" 4 "Rep") rows(1) position(6)) ciopts(recast(. rcap)) xlabel(-.2 -.1 0 .1 .2) title("Adaptation fund") xtitle("Treatment effects") saving(1c, replace)

reg refor_support1 b1.reforestationtreatment if Dem==1 
estimates store rf_dem
reg refor_support1 b1.reforestationtreatment if Rep==1 
estimates store rf_rep


coefplot (rf_dem, msymbol(X) label (Democrats)) (rf_rep, label (Republicans) ), xline(0, lp(dash) lcolor(red)) drop(_cons) ///
levels(99.75 95) legend(order(1 "99.75% CI" 2 "95% CI" 3 "Dem" 4 "Rep") rows(1) position(6)) ciopts(recast(. rcap)) xlabel(-.2 -.1 0 .1 .2) title("Reforestation policy") xtitle("Treatment effects") saving(1d, replace)

reg ctax_support1 b1.carbontaxtreatment if Dem==1
estimates store ct_dem
reg ctax_support1 b1.carbontaxtreatment if Rep==1
estimates store ct_rep

coefplot (ct_dem, msymbol(X) label (Democrats)) (ct_rep, label (Republicans) ), xline(0, lp(dash) lcolor(red)) drop(_cons) ///
levels(99.75 95) legend(order(1 "99.75% CI" 2 "95% CI" 3 "Dem" 4 "Rep") rows(1) position(6)) ciopts(recast(. rcap)) xlabel(-.2 -.1 0 .1 .2) title("Carbon tax and dividend") xtitle("Treatment effects") saving(1e, replace)

reg nuc_support1 b1.nucleartreatment if Dem==1 
estimates store nu_dem
reg nuc_support1 b1.nucleartreatment if Rep==1 
estimates store nu_rep

coefplot (nu_dem, msymbol(X) label (Democrats)) (nu_rep, label (Republicans) ), xline(0, lp(dash) lcolor(red)) drop(_cons) ///
levels(99.75 95) legend(order(1 "99.75% CI" 2 "95% CI" 3 "Dem" 4 "Rep") rows(1) position(6)) ciopts(recast(. rcap)) xlabel(-.2 -.1 0 .1 .2) title("Energy investment policy") xtitle("Treatment effects") saving(1f, replace)

graph combine 1a.gph 1b.gph 1c.gph 1d.gph 1e.gph 1f.gph, col(2)

// Fig 3

label variable Republican "Republican"
label variable Democrat "Democrat"
destring age, replace

reg gj_support1 b1.greenjobstreatment Republican Democrat educ2 gender age
coefplot, xline(0, lp(dash) lcolor(red)) drop(educ2 gender age _cons) xlabel(-.3 -.2 -.1 0 .1 .2 .3) title("Green jobs (Dem)") xtitle("Effect size") saving(1a, replace)

reg re_support1 b1.renewablestreatment Republican Democrat educ2 gender age
coefplot, xline(0, lp(dash) lcolor(red)) drop(educ2 gender age _cons) xlabel(-.3 -.2 -.1 0 .1 .2 .3) title("Renewable energy mandate (Dem)") xtitle("Effect size") saving(1b, replace)

reg adapt_support1 b1.adaptationtreatment Republican Democrat educ2 gender age
coefplot, xline(0, lp(dash) lcolor(red)) drop(educ2 gender age _cons) xlabel(-.3 -.2 -.1 0 .1 .2 .3) title("National adaptation fund (Dem)") xtitle("Effect size") saving(1c, replace)

reg refor_support1 b1.reforestationtreatment Republican Democrat educ2 gender age
coefplot, xline(0, lp(dash) lcolor(red)) drop(educ2 gender age _cons) xlabel(-.3 -.2 -.1 0 .1 .2 .3) title("Reforestation policy (Dem)") xtitle("Effect size") saving(1d, replace)

reg ctax_support1 b1.carbontaxtreatment Republican Democrat educ2 gender age
coefplot, xline(0, lp(dash) lcolor(red)) drop(educ2 gender age _cons) xlabel(-.3 -.2 -.1 0 .1 .2 .3) title("Carbon tax and dividend (Rep)") xtitle("Effect size") saving(1e, replace)

reg nuc_support1 b1.nucleartreatment Republican Democrat educ2 gender age
coefplot, xline(0, lp(dash) lcolor(red)) drop(educ2 gender age _cons) xlabel(-.3 -.2 -.1 0 .1 .2 .3) title("Energy investment policy (Rep)") xtitle("Effect size") saving(1f, replace)

graph combine 1a.gph 1b.gph 1c.gph 1d.gph 1e.gph 1f.gph, col(2)

// Table 1

tab greenjobstreatment gj_support1, row
tab renewablestreatment re_support1, row
tab adaptationtreatment adapt_support1 , row
tab reforestationtreatment refor_support1, row
tab carbontaxtreatment ctax_support1 , row
tab nucleartreatment nuc_support1, row


// Table 2

tab partyid3 gj_support1, row
tab partyid3 re_support1, row
tab partyid3 adapt_support1 , row
tab partyid3 refor_support1, row
tab partyid3 ctax_support1 , row
tab partyid3 nuc_support1, row

////////////

// Table for fig 1

eststo clear
eststo greenjobs: reg gj_support1 b1.greenjobstreatment
eststo renewables: reg re_support1 b1.renewablestreatment
eststo adaptation: reg adapt_support1 b1.adaptationtreatment 
eststo reforest: reg refor_support1 b1.reforestationtreatment 
eststo carbontax: reg ctax_support1 b1.carbontaxtreatment
eststo nuclear: reg nuc_support1 b1.nucleartreatment 

# delimit ;
esttab using figure1.rtf, nogap se b b(%9.3f) starlevels(* .05 ** 0.01 *** 0.001) pr2(%9.3f) 
	title("Cost treatment effects on support" )
	  label nonumbers mtitles("Green jobs" "Renewables" "Adaptation fund" "Reforestation" "Carbon tax" "Energy investment")
	compress replace;
 #delimit cr


// Table for fig 2

eststo clear
eststo greenjobs1: reg gj_support1 b1.greenjobstreatment if Dem==1
eststo greenjobs2: reg gj_support1 b1.greenjobstreatment if Rep==1
eststo renewables1: reg re_support1 b1.renewablestreatment if Dem==1 
eststo renewables2: reg re_support1 b1.renewablestreatment if Rep==1
eststo adaptation1: reg adapt_support1 b1.adaptationtreatment if Dem==1 
eststo adaptation2: reg adapt_support1 b1.adaptationtreatment if Rep==1 

# delimit ;
esttab using figure2a.rtf, nogap se b b(%9.3f) starlevels(* .05 ** 0.01 *** 0.001) pr2(%9.3f) 
	title("Cost treatment effects on support for Republicans and Democrats" )
	  label nonumbers mtitles("Green jobs (Ds only)" "Green jobs (Rs only)" "Renewables (Ds only)" "Renewables (Rs only)" "Adaptation fund (Ds only)" "Adaptation fund (Rs only)")
	compress replace;
 #delimit cr

eststo clear
eststo reforest1: reg refor_support1 b1.reforestationtreatment if Dem==1 
eststo reforest2: reg refor_support1 b1.reforestationtreatment if Rep==1 
eststo carbontax1: reg ctax_support1 b1.carbontaxtreatment if Dem==1
eststo carbontax2: reg ctax_support1 b1.carbontaxtreatment if Rep==1
eststo nuclear1: reg nuc_support1 b1.nucleartreatment if Dem==1 
eststo nuclear2: reg nuc_support1 b1.nucleartreatment if Rep==1 

# delimit ;
esttab using figure2b.rtf, nogap se b b(%9.3f) starlevels(* .05 ** 0.01 *** 0.001) pr2(%9.3f) 
	title("Cost treatment effects on support for Republicans and Democrats" )
	  label nonumbers mtitles("Reforestation (Ds only)" "Reforestation (Rs only)" "Carbon tax (Ds only)" "Carbon tax (Rs only)" "Energy investment(Ds only)" "Energy investment(Rs only)")
	compress replace;
 #delimit cr
 
// table for fig 3


eststo clear
eststo greenjobs: reg gj_support1 b1.greenjobstreatment Republican Democrat educ2 gender age
eststo renewables: reg re_support1 b1.renewablestreatment Republican Democrat educ2 gender age
eststo adaptation: reg adapt_support1 b1.adaptationtreatment Republican Democrat educ2 gender age
eststo reforest: reg refor_support1 b1.reforestationtreatment Republican Democrat educ2 gender age
eststo carbontax: reg ctax_support1 b1.carbontaxtreatment Republican Democrat educ2 gender age
eststo nuclear: reg nuc_support1 b1.nucleartreatment Republican Democrat educ2 gender age

# delimit ;
esttab using figure3.rtf, nogap se b b(%9.3f) starlevels(* .05 ** 0.01 *** 0.001) pr2(%9.3f) 
	title("Cost treatment effects on support" )
	  label nonumbers mtitles("Green jobs" "Renewables" "Adaptation fund" "Reforestation" "Carbon tax" "Energy investment")
	compress replace;
 #delimit cr

 ***************************************************************************************
 // Alternate model specifications with ordinal scale

gen ordinalgj=.
replace ordinalgj=5 if 	green_n==1
replace ordinalgj=5 if 	green_l==1
replace ordinalgj=5 if 	green_m==1
replace ordinalgj=5 if 	green_h==1
replace ordinalgj=4 if 	green_n==2
replace ordinalgj=4 if 	green_l==2
replace ordinalgj=4 if 	green_m==2
replace ordinalgj=4 if 	green_h==2
replace ordinalgj=3 if 	green_n==3
replace ordinalgj=3 if 	green_l==3
replace ordinalgj=3 if 	green_m==3
replace ordinalgj=3 if 	green_h==3
replace ordinalgj=2 if 	green_n==4
replace ordinalgj=2 if 	green_l==4
replace ordinalgj=2 if 	green_m==4
replace ordinalgj=2 if 	green_h==4
replace ordinalgj=1 if 	green_n==5
replace ordinalgj=1 if 	green_l==5
replace ordinalgj=1 if 	green_m==5
replace ordinalgj=1 if 	green_h==5

label define ordinalpolicy 1 "Strongly oppose" 2 "Oppose" 3 "Neither" 4 "Support" 5 "Strongly support"
label values ordinalgj ordinalpolicy


gen ordinalre=.
replace ordinalre=5 if 	re_n==1
replace ordinalre=5 if 	re_l==1
replace ordinalre=5 if 	re_m==1
replace ordinalre=5 if 	re_h==1
replace ordinalre=4 if 	re_n==2
replace ordinalre=4 if 	re_l==2
replace ordinalre=4 if 	re_m==2
replace ordinalre=4 if 	re_h==2
replace ordinalre=3 if 	re_n==3
replace ordinalre=3 if 	re_l==3
replace ordinalre=3 if 	re_m==3
replace ordinalre=3 if 	re_h==3
replace ordinalre=2 if 	re_n==4
replace ordinalre=2 if 	re_l==4
replace ordinalre=2 if 	re_m==4
replace ordinalre=2 if 	re_h==4
replace ordinalre=1 if 	re_n==5
replace ordinalre=1 if 	re_l==5
replace ordinalre=1 if 	re_m==5
replace ordinalre=1 if 	re_h==5

label values ordinalre ordinalpolicy

gen ordinaladapt=.
replace ordinaladapt=5 if 	adapt_n==1
replace ordinaladapt=5 if 	adapt_l==1
replace ordinaladapt=5 if 	adapt_m==1
replace ordinaladapt=5 if 	adapt_h==1
replace ordinaladapt=4 if 	adapt_n==2
replace ordinaladapt=4 if 	adapt_l==2
replace ordinaladapt=4 if 	adapt_m==2
replace ordinaladapt=4 if 	adapt_h==2
replace ordinaladapt=3 if 	adapt_n==3
replace ordinaladapt=3 if 	adapt_l==3
replace ordinaladapt=3 if 	adapt_m==3
replace ordinaladapt=3 if 	adapt_h==3
replace ordinaladapt=2 if 	adapt_n==4
replace ordinaladapt=2 if 	adapt_l==4
replace ordinaladapt=2 if 	adapt_m==4
replace ordinaladapt=2 if 	adapt_h==4
replace ordinaladapt=1 if 	adapt_n==5
replace ordinaladapt=1 if 	adapt_l==5
replace ordinaladapt=1 if 	adapt_m==5
replace ordinaladapt=1 if 	adapt_h==5
label values ordinaladapt ordinalpolicy

gen ordinalctax=.
replace ordinalctax=5 if 	ctax_n==1
replace ordinalctax=5 if 	ctax_l==1
replace ordinalctax=5 if 	ctax_m==1
replace ordinalctax=5 if 	ctax_h==1
replace ordinalctax=4 if 	ctax_n==2
replace ordinalctax=4 if 	ctax_l==2
replace ordinalctax=4 if 	ctax_m==2
replace ordinalctax=4 if 	ctax_h==2
replace ordinalctax=3 if 	ctax_n==3
replace ordinalctax=3 if 	ctax_l==3
replace ordinalctax=3 if 	ctax_m==3
replace ordinalctax=3 if 	ctax_h==3
replace ordinalctax=2 if 	ctax_n==4
replace ordinalctax=2 if 	ctax_l==4
replace ordinalctax=2 if 	ctax_m==4
replace ordinalctax=2 if 	ctax_h==4
replace ordinalctax=1 if 	ctax_n==5
replace ordinalctax=1 if 	ctax_l==5
replace ordinalctax=1 if 	ctax_m==5
replace ordinalctax=1 if 	ctax_h==5
label values ordinalctax ordinalpolicy

gen ordinalreforest=.
replace ordinalreforest=5 if 	reforest_n==1
replace ordinalreforest=5 if 	reforest_l==1
replace ordinalreforest=5 if 	reforest_m==1
replace ordinalreforest=5 if 	reforest_h==1
replace ordinalreforest=4 if 	reforest_n==2
replace ordinalreforest=4 if 	reforest_l==2
replace ordinalreforest=4 if 	reforest_m==2
replace ordinalreforest=4 if 	reforest_h==2
replace ordinalreforest=3 if 	reforest_n==3
replace ordinalreforest=3 if 	reforest_l==3
replace ordinalreforest=3 if 	reforest_m==3
replace ordinalreforest=3 if 	reforest_h==3
replace ordinalreforest=2 if 	reforest_n==4
replace ordinalreforest=2 if 	reforest_l==4
replace ordinalreforest=2 if 	reforest_m==4
replace ordinalreforest=2 if 	reforest_h==4
replace ordinalreforest=1 if 	reforest_n==5
replace ordinalreforest=1 if 	reforest_l==5
replace ordinalreforest=1 if 	reforest_m==5
replace ordinalreforest=1 if 	reforest_h==5
label values ordinalreforest ordinalpolicy

gen ordinalnuclear=.
replace ordinalnuclear=5 if 	nuc_n==41
replace ordinalnuclear=5 if 	nuc_l==41
replace ordinalnuclear=5 if 	nuc_m==41
replace ordinalnuclear=5 if 	nuc_h==41
replace ordinalnuclear=4 if 	nuc_n==42
replace ordinalnuclear=4 if 	nuc_l==42
replace ordinalnuclear=4 if 	nuc_m==42
replace ordinalnuclear=4 if 	nuc_h==42
replace ordinalnuclear=3 if 	nuc_n==43
replace ordinalnuclear=3 if 	nuc_l==43
replace ordinalnuclear=3 if 	nuc_m==43
replace ordinalnuclear=3 if 	nuc_h==43
replace ordinalnuclear=2 if 	nuc_n==44
replace ordinalnuclear=2 if 	nuc_l==44
replace ordinalnuclear=2 if 	nuc_m==44
replace ordinalnuclear=2 if 	nuc_h==44
replace ordinalnuclear=1 if 	nuc_n==45
replace ordinalnuclear=1 if 	nuc_l==45
replace ordinalnuclear=1 if 	nuc_m==45
replace ordinalnuclear=1 if 	nuc_h==45
label values ordinalnuclear ordinalpolicy

label var ordinalgj "Combined green jobs support across payfors"
label var ordinalre "Combined renewables support across payfors"
label var ordinaladapt "Combined adaptation support across payfors"
label var ordinalctax "Combined carbon tax/dividend support across payfors"
label var ordinalreforest "Combined reforestation support across payfors"
label var ordinalnuclear "Combined nuclear support across payfors"

// redoing figure 1 with ordinal measure

reg gj_support1 b1.greenjobstreatment
coefplot, xline(0, lp(dash) lcolor(red)) drop(_cons) levels(99.75 95) legend(order(1 "99.75% CI" 2 "95% CI") rows(1) position(6)) ciopts(recast(. rcap)) xlabel(-.2 -.1 0 .1 .2) title("Green jobs") xtitle("Treatment effects") saving(1a, replace)

reg re_support1 b1.renewablestreatment
coefplot, xline(0, lp(dash) lcolor(red)) drop(_cons) levels(99.75 95) legend(order(1 "99.75% CI" 2 "95% CI") rows(1) position(6)) ciopts(recast(. rcap)) xlabel(-.2 -.1 0 .1 .2) title("Renewable energy mandate") xtitle("Treatment effects") saving(1b, replace)

reg adapt_support1 b1.adaptationtreatment 
coefplot, xline(0, lp(dash) lcolor(red)) drop(_cons) levels(99.75 95) legend(order(1 "99.75% CI" 2 "95% CI") rows(1) position(6)) ciopts(recast(. rcap)) xlabel(-.2 -.1 0 .1 .2) title("National adaptation fund") xtitle("Treatment effects") saving(1c, replace)

reg refor_support1 b1.reforestationtreatment 
coefplot, xline(0, lp(dash) lcolor(red)) drop(_cons) levels(99.75 95) legend(order(1 "99.75% CI" 2 "95% CI") rows(1) position(6)) ciopts(recast(. rcap)) xlabel(-.2 -.1 0 .1 .2) title("Reforestation policy") xtitle("Treatment effects") saving(1d, replace)

reg ctax_support1 b1.carbontaxtreatment
coefplot, xline(0, lp(dash) lcolor(red)) drop(_cons) levels(99.75 95) legend(order(1 "99.75% CI" 2 "95% CI") rows(1) position(6)) ciopts(recast(. rcap)) xlabel(-.2 -.1 0 .1 .2) title("Carbon tax and dividend") xtitle("Treatment effects") saving(1e, replace)

reg nuc_support1 b1.nucleartreatment 
coefplot, xline(0, lp(dash) lcolor(red)) drop(_cons) levels(99.75 95) legend(order(1 "99.75% CI" 2 "95% CI") rows(1) position(6)) ciopts(recast(. rcap)) xlabel(-.2 -.1 0 .1 .2) title("Energy investment policy") xtitle("Treatment effects") saving(1f, replace)
	
graph combine 1a.gph 1b.gph 1c.gph 1d.gph 1e.gph 1f.gph, col(2)


reg ordinalgj b1.greenjobstreatment
coefplot, xline(0, lp(dash) lcolor(red)) drop(_cons) levels(99.75 95) legend(order(1 "99.75% CI" 2 "95% CI") rows(1) position(6)) ciopts(recast(. rcap)) xlabel(-.2 -.1 0 .1 .2) title("Green jobs") xtitle("Treatment effects") saving(1a, replace)

reg ordinalre b1.renewablestreatment
coefplot, xline(0, lp(dash) lcolor(red)) drop(_cons) levels(99.75 95) legend(order(1 "99.75% CI" 2 "95% CI") rows(1) position(6)) ciopts(recast(. rcap)) xlabel(-.2 -.1 0 .1 .2) title("Renewable energy mandate") xtitle("Treatment effects") saving(1b, replace)

reg ordinaladapt b1.adaptationtreatment 
coefplot, xline(0, lp(dash) lcolor(red)) drop(_cons) levels(99.75 95) legend(order(1 "99.75% CI" 2 "95% CI") rows(1) position(6)) ciopts(recast(. rcap)) xlabel(-.2 -.1 0 .1 .2) title("National adaptation fund") xtitle("Treatment effects") saving(1c, replace)

reg ordinalreforest b1.reforestationtreatment 
coefplot, xline(0, lp(dash) lcolor(red)) drop(_cons) levels(99.75 95) legend(order(1 "99.75% CI" 2 "95% CI") rows(1) position(6)) ciopts(recast(. rcap)) xlabel(-.2 -.1 0 .1 .2) title("Reforestation policy") xtitle("Treatment effects") saving(1d, replace)

reg ordinalctax b1.carbontaxtreatment
coefplot, xline(0, lp(dash) lcolor(red)) drop(_cons) levels(99.75 95) legend(order(1 "99.75% CI" 2 "95% CI") rows(1) position(6)) ciopts(recast(. rcap)) xlabel(-.2 -.1 0 .1 .2) title("Carbon tax and dividend") xtitle("Treatment effects") saving(1e, replace)

reg ordinalnuclear b1.nucleartreatment 
coefplot, xline(0, lp(dash) lcolor(red)) drop(_cons) levels(99.75 95) legend(order(1 "99.75% CI" 2 "95% CI") rows(1) position(6)) ciopts(recast(. rcap)) xlabel(-.2 -.1 0 .1 .2) title("Energy investment policy") xtitle("Treatment effects") saving(1f, replace)
	
graph combine 1a.gph 1b.gph 1c.gph 1d.gph 1e.gph 1f.gph, col(2)

// redoing fig 2 with ordinal measure

// Figure 2: Support for each cost treatment by PID
eststo clear
reg gj_support1 b1.greenjobstreatment if Dem==1
estimates store gj_dem
reg gj_support1 b1.greenjobstreatment if Rep==1
estimates store gj_rep

coefplot (gj_dem, msymbol(X) label (Democrats)) (gj_rep, label(Republicans) ), xline(0, lp(dash) lcolor(red)) drop(_cons) ///
levels(99.75 95) legend(order(1 "99.75% CI" 2 "95% CI" 3 "Dem" 4 "Rep") rows(1) position(6)) ciopts(recast(. rcap)) xlabel(-.2 -.1 0 .1 .2) title("Green jobs") xtitle("Treatment effects") saving(1a, replace)

reg re_support1 b1.renewablestreatment if Dem==1 
estimates store re_dem
reg re_support1 b1.renewablestreatment if Rep==1
estimates store re_rep

coefplot (re_dem, msymbol(X) label (Democrats)) (re_rep, label (Republicans) ), xline(0, lp(dash) lcolor(red)) drop(_cons) ///
levels(99.75 95) legend(order(1 "99.75% CI" 2 "95% CI" 3 "Dem" 4 "Rep") rows(1) position(6)) ciopts(recast(. rcap)) xlabel(-.2 -.1 0 .1 .2) title("Renewable mandates") xtitle("Treatment effects") saving(1b, replace)

reg adapt_support1 b1.adaptationtreatment if Dem==1 
estimates store ad_dem
reg adapt_support1 b1.adaptationtreatment if Rep==1 
estimates store ad_rep

coefplot (ad_dem, msymbol(X) label (Democrats)) (ad_rep, label (Republicans) ), xline(0, lp(dash) lcolor(red)) drop(_cons) ///
levels(99.75 95) legend(order(1 "99.75% CI" 2 "95% CI" 3 "Dem" 4 "Rep") rows(1) position(6)) ciopts(recast(. rcap)) xlabel(-.2 -.1 0 .1 .2) title("Adaptation fund") xtitle("Treatment effects") saving(1c, replace)

reg refor_support1 b1.reforestationtreatment if Dem==1 
estimates store rf_dem
reg refor_support1 b1.reforestationtreatment if Rep==1 
estimates store rf_rep


coefplot (rf_dem, msymbol(X) label (Democrats)) (rf_rep, label (Republicans) ), xline(0, lp(dash) lcolor(red)) drop(_cons) ///
levels(99.75 95) legend(order(1 "99.75% CI" 2 "95% CI" 3 "Dem" 4 "Rep") rows(1) position(6)) ciopts(recast(. rcap)) xlabel(-.2 -.1 0 .1 .2) title("Reforestation policy") xtitle("Treatment effects") saving(1d, replace)

reg ctax_support1 b1.carbontaxtreatment if Dem==1
estimates store ct_dem
reg ctax_support1 b1.carbontaxtreatment if Rep==1
estimates store ct_rep

coefplot (ct_dem, msymbol(X) label (Democrats)) (ct_rep, label (Republicans) ), xline(0, lp(dash) lcolor(red)) drop(_cons) ///
levels(99.75 95) legend(order(1 "99.75% CI" 2 "95% CI" 3 "Dem" 4 "Rep") rows(1) position(6)) ciopts(recast(. rcap)) xlabel(-.2 -.1 0 .1 .2) title("Carbon tax and dividend") xtitle("Treatment effects") saving(1e, replace)

reg nuc_support1 b1.nucleartreatment if Dem==1 
estimates store nu_dem
reg nuc_support1 b1.nucleartreatment if Rep==1 
estimates store nu_rep

coefplot (nu_dem, msymbol(X) label (Democrats)) (nu_rep, label (Republicans) ), xline(0, lp(dash) lcolor(red)) drop(_cons) ///
levels(99.75 95) legend(order(1 "99.75% CI" 2 "95% CI" 3 "Dem" 4 "Rep") rows(1) position(6)) ciopts(recast(. rcap)) xlabel(-.2 -.1 0 .1 .2) title("Energy investment policy") xtitle("Treatment effects") saving(1f, replace)

graph combine 1a.gph 1b.gph 1c.gph 1d.gph 1e.gph 1f.gph, col(2)

// Figure 2b: Support for each cost treatment by PID

eststo clear
reg ordinalgj b1.greenjobstreatment if Dem==1
estimates store gj_dem
reg ordinalgj b1.greenjobstreatment if Rep==1
estimates store gj_rep

coefplot (gj_dem, msymbol(X) label (Democrats)) (gj_rep, label(Republicans) ), xline(0, lp(dash) lcolor(red)) drop(_cons) ///
levels(99.75 95) legend(order(1 "99.75% CI" 2 "95% CI" 3 "Dem" 4 "Rep") rows(1) position(6)) ciopts(recast(. rcap)) xlabel(-.2 -.1 0 .1 .2) title("Green jobs") xtitle("Treatment effects") saving(1a, replace)

reg ordinalre b1.renewablestreatment if Dem==1 
estimates store re_dem
reg ordinalre b1.renewablestreatment if Rep==1
estimates store re_rep

coefplot (re_dem, msymbol(X) label (Democrats)) (re_rep, label (Republicans) ), xline(0, lp(dash) lcolor(red)) drop(_cons) ///
levels(99.75 95) legend(order(1 "99.75% CI" 2 "95% CI" 3 "Dem" 4 "Rep") rows(1) position(6)) ciopts(recast(. rcap)) xlabel(-.2 -.1 0 .1 .2) title("Renewable mandates") xtitle("Treatment effects") saving(1b, replace)

reg ordinaladapt b1.adaptationtreatment if Dem==1 
estimates store ad_dem
reg ordinaladapt b1.adaptationtreatment if Rep==1 
estimates store ad_rep

coefplot (ad_dem, msymbol(X) label (Democrats)) (ad_rep, label (Republicans) ), xline(0, lp(dash) lcolor(red)) drop(_cons) ///
levels(99.75 95) legend(order(1 "99.75% CI" 2 "95% CI" 3 "Dem" 4 "Rep") rows(1) position(6)) ciopts(recast(. rcap)) xlabel(-.2 -.1 0 .1 .2) title("Adaptation fund") xtitle("Treatment effects") saving(1c, replace)

reg ordinalreforest b1.reforestationtreatment if Dem==1 
estimates store rf_dem
reg ordinalreforest b1.reforestationtreatment if Rep==1 
estimates store rf_rep


coefplot (rf_dem, msymbol(X) label (Democrats)) (rf_rep, label (Republicans) ), xline(0, lp(dash) lcolor(red)) drop(_cons) ///
levels(99.75 95) legend(order(1 "99.75% CI" 2 "95% CI" 3 "Dem" 4 "Rep") rows(1) position(6)) ciopts(recast(. rcap)) xlabel(-.2 -.1 0 .1 .2) title("Reforestation policy") xtitle("Treatment effects") saving(1d, replace)

reg ordinalctax b1.carbontaxtreatment if Dem==1
estimates store ct_dem
reg ordinalctax b1.carbontaxtreatment if Rep==1
estimates store ct_rep

coefplot (ct_dem, msymbol(X) label (Democrats)) (ct_rep, label (Republicans) ), xline(0, lp(dash) lcolor(red)) drop(_cons) ///
levels(99.75 95) legend(order(1 "99.75% CI" 2 "95% CI" 3 "Dem" 4 "Rep") rows(1) position(6)) ciopts(recast(. rcap)) xlabel(-.2 -.1 0 .1 .2) title("Carbon tax and dividend") xtitle("Treatment effects") saving(1e, replace)

reg ordinalnuclear b1.nucleartreatment if Dem==1 
estimates store nu_dem
reg ordinalnuclear b1.nucleartreatment if Rep==1 
estimates store nu_rep

coefplot (nu_dem, msymbol(X) label (Democrats)) (nu_rep, label (Republicans) ), xline(0, lp(dash) lcolor(red)) drop(_cons) ///
levels(99.75 95) legend(order(1 "99.75% CI" 2 "95% CI" 3 "Dem" 4 "Rep") rows(1) position(6)) ciopts(recast(. rcap)) xlabel(-.2 -.1 0 .1 .2) title("Energy investment policy") xtitle("Treatment effects") saving(1f, replace)

graph combine 1a.gph 1b.gph 1c.gph 1d.gph 1e.gph 1f.gph, col(2)


// redoing fig 3 with ordinal measure

label variable Republican "Republican"
label variable Democrat "Democrat"
destring age, replace



reg gj_support1 b1.greenjobstreatment Republican Democrat educ2 gender age
coefplot, xline(0, lp(dash) lcolor(red)) drop(educ2 gender age _cons) xlabel(-.3 -.2 -.1 0 .1 .2 .3) title("Green jobs (Dem)") xtitle("Effect size") saving(1a, replace)

reg re_support1 b1.renewablestreatment Republican Democrat educ2 gender age
coefplot, xline(0, lp(dash) lcolor(red)) drop(educ2 gender age _cons) xlabel(-.3 -.2 -.1 0 .1 .2 .3) title("Renewable energy mandate (Dem)") xtitle("Effect size") saving(1b, replace)

reg adapt_support1 b1.adaptationtreatment Republican Democrat educ2 gender age
coefplot, xline(0, lp(dash) lcolor(red)) drop(educ2 gender age _cons) xlabel(-.3 -.2 -.1 0 .1 .2 .3) title("National adaptation fund (Dem)") xtitle("Effect size") saving(1c, replace)

reg refor_support1 b1.reforestationtreatment Republican Democrat educ2 gender age
coefplot, xline(0, lp(dash) lcolor(red)) drop(educ2 gender age _cons) xlabel(-.3 -.2 -.1 0 .1 .2 .3) title("Reforestation policy (Dem)") xtitle("Effect size") saving(1d, replace)

reg ctax_support1 b1.carbontaxtreatment Republican Democrat educ2 gender age
coefplot, xline(0, lp(dash) lcolor(red)) drop(educ2 gender age _cons) xlabel(-.3 -.2 -.1 0 .1 .2 .3) title("Carbon tax and dividend (Rep)") xtitle("Effect size") saving(1e, replace)

reg nuc_support1 b1.nucleartreatment Republican Democrat educ2 gender age
coefplot, xline(0, lp(dash) lcolor(red)) drop(educ2 gender age _cons) xlabel(-.3 -.2 -.1 0 .1 .2 .3) title("Energy investment policy (Rep)") xtitle("Effect size") saving(1f, replace)

graph combine 1a.gph 1b.gph 1c.gph 1d.gph 1e.gph 1f.gph, col(2)

// fig 3 redone with ordinal


reg ordinalgj b1.greenjobstreatment Republican Democrat educ2 gender age
coefplot, xline(0, lp(dash) lcolor(red)) drop(educ2 gender age _cons) xlabel(-.3 -.2 -.1 0 .1 .2 .3) title("Green jobs (Dem)") xtitle("Effect size") saving(1a, replace)

reg ordinalre b1.renewablestreatment Republican Democrat educ2 gender age
coefplot, xline(0, lp(dash) lcolor(red)) drop(educ2 gender age _cons) xlabel(-.3 -.2 -.1 0 .1 .2 .3) title("Renewable energy mandate (Dem)") xtitle("Effect size") saving(1b, replace)

reg ordinaladapt b1.adaptationtreatment Republican Democrat educ2 gender age
coefplot, xline(0, lp(dash) lcolor(red)) drop(educ2 gender age _cons) xlabel(-.3 -.2 -.1 0 .1 .2 .3) title("National adaptation fund (Dem)") xtitle("Effect size") saving(1c, replace)

reg ordinalctax b1.reforestationtreatment Republican Democrat educ2 gender age
coefplot, xline(0, lp(dash) lcolor(red)) drop(educ2 gender age _cons) xlabel(-.3 -.2 -.1 0 .1 .2 .3) title("Reforestation policy (Dem)") xtitle("Effect size") saving(1d, replace)

reg ordinalreforest b1.carbontaxtreatment Republican Democrat educ2 gender age
coefplot, xline(0, lp(dash) lcolor(red)) drop(educ2 gender age _cons) xlabel(-.3 -.2 -.1 0 .1 .2 .3) title("Carbon tax and dividend (Rep)") xtitle("Effect size") saving(1e, replace)

reg ordinalnuclear b1.nucleartreatment Republican Democrat educ2 gender age
coefplot, xline(0, lp(dash) lcolor(red)) drop(educ2 gender age _cons) xlabel(-.3 -.2 -.1 0 .1 .2 .3) title("Energy investment policy (Rep)") xtitle("Effect size") saving(1f, replace)

graph combine 1a.gph 1b.gph 1c.gph 1d.gph 1e.gph 1f.gph, col(2)

eststo clear
eststo greenjobs2: reg ordinalgj b1.greenjobstreatment
eststo renewables2: reg ordinalre b1.renewablestreatment
eststo adaptation2: reg ordinaladapt b1.adaptationtreatment 
eststo reforest2: reg ordinalreforest b1.reforestationtreatment 
eststo carbontax2: reg ordinalctax b1.carbontaxtreatment
eststo nuclear2: reg ordinalnuclear b1.nucleartreatment 

# delimit ;
esttab using figure1a.rtf, nogap se b b(%9.3f) starlevels(* .05 ** 0.01 *** 0.001) pr2(%9.3f) 
	title("Cost treatment effects on support" )
	  label nonumbers mtitles("Green jobs" "Renewables" "Adaptation fund" "Reforestation" "Carbon tax" "Energy investment")
	compress replace;
 #delimit cr


**************

// redoing fig 2 with for Independents
label variable Independent"Independent"

eststo clear
reg gj_support1 b1.greenjobstreatment if Dem==1
estimates store gj_dem
reg gj_support1 b1.greenjobstreatment if Rep==1
estimates store gj_rep
reg gj_support1 b1.greenjobstreatment if Ind==1
estimates store gj_ind


coefplot (gj_dem, msymbol(X) label (Democrats)) (gj_rep, label(Republicans) ) (gj_ind, msymbol(T) label(Independents)), xline(0, lp(dash) lcolor(red)) drop(_cons) ///
levels(99.75 95) legend(order(1 "99.75% CI" 2 "95% CI" 3 "Dem" 4 "Rep (•)" 5 "Ind (▲)") rows(1) position(6)) ciopts(recast(. rcap)) xlabel(-.2 -.1 0 .1 .2) title("Green jobs") xtitle("Treatment effects") saving(1a, replace)


coefplot (gj_dem, msymbol(X) label (Democrats)) (gj_rep, label(Republicans) ) (gj_ind, msymbol(T) label(Independents)), xline(0, lp(dash) lcolor(red)) drop(_cons) ///
levels(99.75 95) legend(order(1 "99.75% CI" 2 "95% CI" 3 "Dem (x)" 4 "Rep (•)" 5 "Ind (▲)") rows(1) position(6)) ciopts(recast(. rcap)) xlabel(-.2 -.1 0 .1 .2) title("Green jobs") xtitle("Treatment effects") saving(1a, replace)


reg re_support1 b1.renewablestreatment if Dem==1 
estimates store re_dem
reg re_support1 b1.renewablestreatment if Rep==1
estimates store re_rep
reg re_support1 b1.renewablestreatment if Ind==1
estimates store re_ind

coefplot (re_dem, msymbol(X) label (Democrats)) (re_rep, label (Republicans)) (re_ind, msymbol(T) label(Independents)), xline(0, lp(dash) lcolor(red)) drop(_cons) ///
levels(99.75 95) legend(order(1 "99.75% CI" 2 "95% CI" 3 "Dem (x)" 4 "Rep (•)" 5 "Ind (▲)") rows(1) position(6)) ciopts(recast(. rcap)) xlabel(-.2 -.1 0 .1 .2) title("Renewable mandates") xtitle("Treatment effects") saving(1b, replace)

reg adapt_support1 b1.adaptationtreatment if Dem==1 
estimates store ad_dem
reg adapt_support1 b1.adaptationtreatment if Rep==1 
estimates store ad_rep
reg adapt_support1 b1.adaptationtreatment if Ind==1 
estimates store ad_ind

coefplot (ad_dem, msymbol(X) label (Democrats)) (ad_rep, label (Republicans) ) (ad_ind, msymbol(T) label(Independents)), xline(0, lp(dash) lcolor(red)) drop(_cons) ///
levels(99.75 95) legend(order(1 "99.75% CI" 2 "95% CI" 3 "Dem (x)" 4 "Rep (•)" 5 "Ind (▲)") rows(1) position(6)) ciopts(recast(. rcap)) xlabel(-.2 -.1 0 .1 .2) title("Adaptation fund") xtitle("Treatment effects") saving(1c, replace)

reg refor_support1 b1.reforestationtreatment if Dem==1 
estimates store rf_dem
reg refor_support1 b1.reforestationtreatment if Rep==1 
estimates store rf_rep
reg refor_support1 b1.reforestationtreatment if Ind==1 
estimates store rf_ind

coefplot (rf_dem, msymbol(X) label (Democrats)) (rf_rep, label (Republicans)) (rf_ind, msymbol(T) label(Independents)), xline(0, lp(dash) lcolor(red)) drop(_cons) ///
levels(99.75 95) legend(order(1 "99.75% CI" 2 "95% CI" 3 "Dem (x)" 4 "Rep (•)" 5 "Ind (▲)")  rows(1) position(6)) ciopts(recast(. rcap)) xlabel(-.2 -.1 0 .1 .2) title("Reforestation policy") xtitle("Treatment effects") saving(1d, replace)

reg ctax_support1 b1.carbontaxtreatment if Dem==1
estimates store ct_dem
reg ctax_support1 b1.carbontaxtreatment if Rep==1
estimates store ct_rep
reg ctax_support1 b1.carbontaxtreatment if Ind==1
estimates store ct_ind

coefplot (ct_dem, msymbol(X) label (Democrats)) (ct_rep, label (Republicans) ) (ct_ind, msymbol(T) label(Independents)), xline(0, lp(dash) lcolor(red)) drop(_cons) ///
levels(99.75 95) legend(order(1 "99.75% CI" 2 "95% CI" 3 "Dem (x)" 4 "Rep (•)" 5 "Ind (▲)")  rows(1) position(6)) ciopts(recast(. rcap)) xlabel(-.2 -.1 0 .1 .2) title("Carbon tax and dividend") xtitle("Treatment effects") saving(1e, replace)

reg nuc_support1 b1.nucleartreatment if Dem==1 
estimates store nu_dem
reg nuc_support1 b1.nucleartreatment if Rep==1 
estimates store nu_rep
reg nuc_support1 b1.nucleartreatment if Ind==1 
estimates store nu_ind

coefplot (nu_dem, msymbol(X) label (Democrats)) (nu_rep, label (Republicans) ) (nu_ind, msymbol(T) label(Independents)), xline(0, lp(dash) lcolor(red)) drop(_cons) ///
levels(99.75 95) legend(order(1 "99.75% CI" 2 "95% CI" 3 "Dem (x)" 4 "Rep (•)" 5 "Ind (▲)")  rows(1) position(6)) ciopts(recast(. rcap)) xlabel(-.2 -.1 0 .1 .2) title("Energy investment policy") xtitle("Treatment effects") saving(1f, replace)

graph combine 1a.gph 1b.gph 1c.gph 1d.gph 1e.gph 1f.gph, col(2)

// Table for fig 1, expanded w/ controls

eststo clear
eststo greenjobs: reg gj_support1 b1.greenjobstreatment educ2 gender age
eststo renewables: reg re_support1 b1.renewablestreatment educ2 gender age
eststo adaptation: reg adapt_support1 b1.adaptationtreatment educ2 gender age 
eststo reforest: reg refor_support1 b1.reforestationtreatment educ2 gender age
eststo carbontax: reg ctax_support1 b1.carbontaxtreatment educ2 gender age
eststo nuclear: reg nuc_support1 b1.nucleartreatment educ2 gender age

# delimit ;
esttab using fR2.rtf, nogap se b b(%9.3f) starlevels(* .05 ** 0.01 *** 0.001) pr2(%9.3f) 
	title("Cost treatment effects on support" )
	  label nonumbers mtitles("Green jobs" "Renewables" "Adaptation fund" "Reforestation" "Carbon tax" "Energy investment")
	compress replace;
 #delimit cr
